package com.qst.express.config;

import com.qst.express.interceptor.LoginInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author:CoolTiger
 * @title: AdminWebconfig
 * @projectName springboot-e
 * @description: TODO
 * @date:2022/10/11/15:13:39
 **/
@Configuration
public class AdminWebconfig implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new LoginInterceptor())
                .addPathPatterns("/**")
                .excludePathPatterns("/","/swagger-resources/**","/MP_verify_TDxPzdpHATA6cuL6.txt","/e/wx/login","/e/wx/loginSms/**","/css/**","/images/**","/js/**","/layer/**",
                        "/qrcode/**","/wximages/**","/swagger-ui.html/**","/webjars/**","/e/courier/**",
                        "/express/eadmin/**","/e/express/**","/e/fileoss/**","/e/user/**");
    }
}
